package com.neusoft.chenhanhua.d0922;

public class Cfudaying implements Runnable {
    private int i=100;
	@Override
	public void run() {
		while (true) {
			synchronized (this) {
				if (i>0) {
					
					System.out.println(Thread.currentThread()+":::"+i);
					i--;
					try {
						notify();
						wait();
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
					
				} else {
                     break;
				}
			}
		}
	}

}
